package com.apes.fn.scm.merchant.settlement.repository;

import com.apes.fn.scm.merchant.settlement.model.CostSummary;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @BelongsProject: apes-server
 * @BelongsPackage: com.apes.fn.scm.merchant.settlement.repository
 * @ClassName: CostSummaryRepository
 * @Author: pyb
 * @Description: 成本汇总数据层
 * @CreateTime: 2020-10-29 15:09
 * @Version: 1.0
 */
public interface CostSummaryRepository extends CustomRepository<CostSummary, String> {
    /**
     * fetch data by merchantSettlement id
     * @param id merchantSettlement id
     * @return CostSummary
     */
    @Query("select T from CostSummary T where T.merchantSettlement.id=?1 ")
    List<CostSummary> findAllByMerchantSettlement(String id);

}
